<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script src="../js/vue.js"></script>
</head>

<body>

    <!-- 布尔值 -->
    <div id="app">
        <h3>分数：{{score}}</h3>
        <div v-if="score>=90">优秀</div>
        <div v-else-if="score>=80">良好</div>
        <div v-else-if="score>=60">及格</div>
        <div v-else>不及格</div>
    </div>

    <div id="app-2">
        数量：<input type="text" value="" id="sum">
        价格：<input type="text" value="" id="price">
        小计：<input type="text" value="{{total}}" v-bind:id="total">
    </div>




</body>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            score: Math.round(Math.random() * 100),
        }
    })

    var app2 = new Vue({
        el: "#app-2",
        data: {
            total: sum * price
        }
    })


</script>

</html>